import roleData from './role'
import routerData from './router'

export default [
     {
        url:'/role/getlist',
        method:'get',
        response(){
            const data=roleData.map(item=>{
                if(item.routerId=='*'){
                    item.auth=routerData
                }else{
                    item.auth=routerData.filter(val=>item.routerId.includes(val.id))
                }
                return item
            })
            console.log(data);
            return {
                code:200,
                msg:'获取成功',
                roleData
            }
        }
    }
]
